Release 10.1A: OpenEdge Development:
Programming Interfaces
Creating data definitions for an ActiveX control
These fragments provide data and code definitions, including those for the spin button control, referenced by other sections of the application. The first fragment contains variable definitions that are hand-coded in the Definitions section of the AppBuilder Section Editor:
Note the variable to hold the component handle CSSpin ActiveX control. All other necessary widget and component handles for this application are provided by the AppBuilder.
This is the query definition assembled by the AppBuilder from user input. The
PRESELECToption allows the application to know the number of records it is scanning with the spin button at startup:
The following code section shows relevant widget handle, component handle, and query definitions generated by the AppBuilder from user input. The AppBuilder assembles the widget definitions as you add objects to the design window. Thus, the AppBuilder assembles the definitions for the control-frame handles (
Note: You can begin setting ActiveX control properties in the OCX Property Editor Window any time after you add the control into the design window.custSpinandchcustSpin) after you insert the spin button control into the design window. (The programmer has changed the name of the control-frame fromCtrlFrametocustSpin.) The application also uses theRecord_Countvariable to display the ordinal record number of each Customer record scanned by the spin button control:
Note: You cannot view or change this AppBuilder-generated code from the Section Editor. However, it is part of the
.wfile generated for the application, and you can use Code Preview option of the Tools menu to view this code.The AppBuilder automatically generates the query definition from the query criteria entered earlier.
This fragment shows the actual control-frame definition created by the AppBuilder using the
custSpinwidget handle defined earlier. The AppBuilder creates and maintains this definition as you insert, position, and size the spin button control in the design window. Note the setting of the control-frameNAMEattribute after the widget is created and parented to the Dialog-Frame frame. The AppBuilder also sets theHIDDENattribute to no (FALSE) because the spin button control is, by default, a visible control:
Note: You cannot view or change this AppBuilder-generated code from the Section Editor. However, it is part of the
.wfile generated for the application, and you can use Code Preview option of the Tools menu to view this code.The AppBuilder also ensures, with appropriate preprocessor settings, that Progress only compiles and executes OCX-related sections of this procedure file if it is running in the graphical mode (not
TTY) of a Windows system (WIN32).
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |